package xin.cms.repository;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;
import xin.cms.enums.CheckStatus;
import xin.cms.model.Comment;

import java.util.List;

/**
 * <pre>
 * 评论仓库
 * </pre>
 * @version 1.0
 * @author lixin_ma@outlook.com
 * @since 2018/8/9
 */
@Repository
public interface CommentRepository extends PagingAndSortingRepository<Comment, String>, JpaSpecificationExecutor<Comment> {
    List<Comment> findAllByOwnIdAndStatusOrderByCreateTime(Pageable pageable,String ownerId, CheckStatus status);
}
